import { $post, $put } from '@js/request'

export async function createRequest (d: any): Promise<void> {
  const res = await $post('/api/common/maintainlog', d)
  return res.data
}

export async function updateRequest (d: any): Promise<void> {
  const id: string = d.id
  delete d.id
  const res = await $put(`/api/common/maintainlog/${id}`, d)
  return res.data
}
